package com.itheima.service;

import com.itheima.dao.UserDao;
import com.itheima.dao.UserDaoA;
import com.itheima.pojo.Address;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

public class UserServiceA  {

    public List<User> operator() {
        // 1 业务处理
        UserDaoA operator = new UserDaoA();
        List<User> users = operator.operator();
        for (User user : users) {
            user.getAddress().setProvince(user.getAddress().getProvince() + " 省/市");
            user.getAddress().setCity(user.getAddress().getCity() + " 市/区");
        }
        return users;
    }
}
